/**
 * 
 */
package com.bestbuy.pojo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Fetch;
import org.hibernate.annotations.FetchMode;

/**
 * @author ThanhNgo
 *
 */
@Entity
@Table(name = "image_product")
public class ImageProduct {

	@Id
	@Column(name = "IDIMAGEPRODUCT")
    private Integer idimageproduct;
	
	@ManyToOne
    @JoinColumn(name="IDPRODUCT")
	@Fetch(FetchMode.JOIN)
    private Product product;
    
    @Column(name = "LINKIMAGE")
    private String linkimage;
    
    @Column(name = "TYPE")
    private String type;

	public Integer getIdimageproduct() {
		return idimageproduct;
	}

	public void setIdimageproduct(Integer idimageproduct) {
		this.idimageproduct = idimageproduct;
	}

	public Product getProduct() {
		return product;
	}

	public void setProduct(Product product) {
		this.product = product;
	}

	public String getLinkimage() {
		return linkimage;
	}

	public void setLinkimage(String linkimage) {
		this.linkimage = linkimage;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public ImageProduct(Integer idimageproduct, Product product,
			String linkimage, String type) {
		super();
		this.idimageproduct = idimageproduct;
		this.product = product;
		this.linkimage = linkimage;
		this.type = type;
	}

	public ImageProduct() {
		// TODO Auto-generated constructor stub
	}
    
    
}
